package yf.mall.service;

import yf.mall.entity.MallGoodsEntity;
import yf.mall.entity.StockRecordEntity;
import com.yf.service.BaseService;
import yf.mall.vo.ActGoodsVo;
import yf.mall.vo.PriceVo;

import java.util.List;
import java.util.Map;

/**
 * 产品Service接口
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Mon Aug 05 11:30:53 CST 2019
 */
public interface MallGoodsService extends BaseService<MallGoodsEntity> {

     /**back**/

     //更新与新增产品
     MallGoodsEntity merge(ActGoodsVo actGoodsVo,Long userId);

     //获取产品带Sku信息
     MallGoodsEntity getWithSku(Long goodsId);

     //更新产品库存
     MallGoodsEntity updateStock(StockRecordEntity stockRecordEntity);

     List<MallGoodsEntity> findNoGoodId(Long id);

     void saveFromGoods(ActGoodsVo actGoodsVo,  Long userId);

     void updateFromGoods(ActGoodsVo actGoodsVo, Long userId);

     void delByUserId(Long userId);

     void delByGoodsId(Long[] ids);
     /**api**/
     List<MallGoodsEntity> findGoods();

     //分页获取产品列表隐藏字段
     List<MallGoodsEntity> topList(int limit,int page);

     //获取产品详情隐藏字段
     MallGoodsEntity getDetail(Long goodsId);

     //根据级别筛选
     List<MallGoodsEntity> filterByLevel(Long userId,List<MallGoodsEntity> mallGoodsEntities);

     //根据分类id查询产品
     List<MallGoodsEntity> queryMallGoods(Map<String,Object> map);

     List<MallGoodsEntity> searchName(String name);

     //根据标签名模糊查询
     List<MallGoodsEntity> findBySaleType(Map<String, Object> map, Long type);
     List mapBySaleType(Long userId,Long saleTypeId);

     //进货价格表
     List<PriceVo> priceTable(Long userId, Long goodId);

     //获取用户上架的产品 针对店家
     List<MallGoodsEntity> findByUserId(Long userId,Integer shelf);

     List<MallGoodsEntity> findByTypeAndGoodsNameAndShelf(Integer type,String name,Integer shelf,Long userId,Integer saleType);

    List<MallGoodsEntity> findDailyList(Integer shelf, Integer dailySel,Integer dailySelRotation);

     List<MallGoodsEntity> daily();


     /**common**/


}
